How can I reach the azure database for postgresql (Temporary failure in name resolution)

Patrick RANDRIANJATOVO 20 Reputation points
2024-05-14T09:00:59.56+00:00

Hello,

I created an azure database for postgresql flexible service. As for today, I can not reach anymore the server.

When I try to connect with psql, I got this :

psql: error: could not translate host name "xxxxx.postgres.database.azure.com" to address: Temporary failure in name resolution

Thank you for your help

Azure Database for PostgreSQL
{count} votes

2 answers

Sort by: Most helpful
  1. ShaktiSingh-MSFT 13,996 Reputation points Microsoft Employee
    2024-05-14T13:59:38.9066667+00:00

    Hi Patrick RANDRIANJATOVO •,

    Welcome to Microsoft Q&A forum.

    As I understand, you are unable to connect to Azure PostgreSQL and getting "could not translate host name "xxxxx.postgres.database.azure.com" to address: Temporary failure in name resolution"

    This error might be temporary due to some maintenance operation.

    In the meantime, could you please try to connect using Azure CLI to check if server exists https://learn.microsoft.com/en-us/azure/postgresql/flexible-server/quickstart-create-server-cli?

    Also, is your server under virtual network?

    Thanks

    0 comments No comments

  2. Rahul Randive 8,751 Reputation points Microsoft Employee
    2024-05-15T15:13:51.62+00:00

    Hi @Patrick RANDRIANJATOVO

    According to the error message, it sounds like a client network issue, such as DNS issue.

    Try to add the IP resolution of the server name in local host file and see if it helps

    Else try to restart in non-business hours and connect.

    Please find document below on Steps to resolve transient connectivity issues

    https://learn.microsoft.com/en-us/azure/postgresql/flexible-server/how-to-troubleshoot-common-connection-issues

    Thank You!

    0 comments No comments